package com.example.administrator.yuejian_2.activity;
<<<<<<< HEAD
=======

>>>>>>> b079ae49aea3652b48f9c84201c89333c2f216f2
import android.support.v4.app.FragmentManager;
import android.support.v4.app.FragmentTransaction;
import android.os.Bundle;
import android.support.v7.app.AppCompatActivity;

import com.example.administrator.yuejian_2.R;
import com.example.administrator.yuejian_2.fragment.MainFragment;

public class MainActivity extends AppCompatActivity {
    private MainFragment mainFragment;
    private FragmentManager fragmentManager;
    private FragmentTransaction fragmentTransaction;



<<<<<<< HEAD

=======
>>>>>>> b079ae49aea3652b48f9c84201c89333c2f216f2
    @Override
    protected void onCreate(Bundle savedInstanceState) {
        super.onCreate(savedInstanceState);
        setContentView(R.layout.activity_main);
        fragmentManager = getSupportFragmentManager();
        showMainFragment();


    }



    private void showMainFragment(){
        fragmentTransaction = fragmentManager.beginTransaction();
        mainFragment = new MainFragment();
        fragmentTransaction.add(R.id.fragment_holder, mainFragment);
        fragmentTransaction.commit();

    }


<<<<<<< HEAD

=======
>>>>>>> b079ae49aea3652b48f9c84201c89333c2f216f2
}
